package com.power.flowable.api;


import com.plf.common.domain.ResponseDTO;
import com.power.flowable.model.Act_dsn_btn;
import com.power.flowable.model.pageinfo.Act_dsn_btnPageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  流程标准按钮 Feign
 */
@FeignClient(value = "sfflow-svr", contextId = "sfflow-svr", path = "/sfflow-svr")
@RestController
public interface IAct_dsn_btnFeign {

    /**
     * 流程标准按钮分页列表
     */
    @PostMapping("/act_dsn_btn/list")
    ResponseDTO list(@RequestBody Act_dsn_btnPageInfo act_dsn_btnPageInfo);

    /**
     * 查看流程标准按钮
     */
    @GetMapping("/act_dsn_btn/view")
    ResponseDTO view(@RequestParam("id") String id);

    ///**
    // * 查看流程标准按钮 复合主键使用
    // */
    //@PostMapping("/act_dsn_btn/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Act_dsn_btn.Act_dsn_btnPK pk);

    /**
     * 修改或保存流程标准按钮
     */
    @PostMapping("/act_dsn_btn/save")
    ResponseDTO save(@RequestBody Act_dsn_btn  act_dsn_btn);

    /**
     * 删除流程标准按钮
     */
    @PostMapping("/act_dsn_btn/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 删除流程标准按钮 复合主键使用
    // */
    //@PostMapping("/act_dsn_btn/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Act_dsn_btn.Act_dsn_btnPK pk);

    /**
     * 批量删除流程标准按钮
     */
    @PostMapping("/act_dsn_btn/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

     /**
     * 导出excel
     */
    @PostMapping("/act_dsn_btn/output")
    void output(@RequestParam HttpServletResponse response, @RequestBody Act_dsn_btnPageInfo act_dsn_btnPageInfo);

     /**
     * 导出excel模板
     */
    @PostMapping("/act_dsn_btn/exportExcelTemplate")
    void exportExcelTemplate(@RequestParam HttpServletResponse response);

     /**
     *	导入excel
     */
    @PostMapping("/act_dsn_btn/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 改变按钮的有效状态
     * @param id
     * @param enable
     * @return
     */
    @PostMapping("/act_dsn_btn/toggleEnable")
    ResponseDTO toggleEnable(@RequestParam("id") String id, @RequestParam("enable") Integer enable);

}
